Skip to main content

Security Properties Comprehensive

Time to read: 45 minutes
Prerequisites: Understanding of all ProVerif models
Difficulty: Intermediate
Next: 06 Implementation Alignment


The Simple Story​

The Signal Protocol has 7 key security properties that formal verification proves.

This document gives you:

  • Quick reference table: All properties at a glance
  • Inline explanations: Each property explained in context
  • Detailed proofs: Mathematical queries and what they mean
  • Model-by-model coverage: Which models prove which properties

Mental Model: The Security Properties​

Hold this picture in your head:


Quick Reference Table​

PropertyCategoryProVerif QueryModelFilesStatus
Key SecrecyX3DHattacker(sk)x3dh_complete.pvx3dh_complete.pv:36Proved
AuthenticationX3DHinj-event(alice_initiates) ⇒ inj-event(bob_responds)x3dh_complete.pvx3dh_complete.pv:37Proved
MITM ResistanceX3DHinj-event(bobs_keys_upload) ⇒ inj-event(signature_verified(x))x3dh_security.pvx3dh_security.pv:35Proved
4 DH OrderingX3DHinj-event(dh1) ⇒ inj-event(dh2) (x3)x3dh_4dh.pvx3dh_4dh.pv:34+Proved
Key DerivationX3DHinj-event(x3dh_secret(x))x3dh_complete.pvx3dh_complete.pv:38Proved
Message Key SecrecyDouble Ratchetattacker(message_key)key_derivation.pvkey_derivation.pv:50Proved
Chain Key SecrecyDouble Ratchetattacker(chain_key)key_derivation.pvkey_derivation.pv:56Proved
AAD FormatDouble Ratchetinj-event(aad_generated(x))key_derivation.pvkey_derivation.pv:52Proved
Root Key DerivationDouble Ratchetinj-event(root_key_derived(x))dr.pvdr.pv:54Proved
Chain Key DerivationDouble Ratchetinj-event(chain_key_derived(x))key_derivation.pvkey_derivation.pv:64,75Proved
Forward SecrecyDouble Ratchetinj-event(encrypt(m_n)) ⇒ ∀i<n: ¬attacker(key_i)security.pvsecurity.pv:67Proved
Post-Compromise SecurityDouble Ratchetinj-event(new_dh_ratchet) ⇒ inj-event(secure_recovery)security.pvsecurity.pv:72Proved
Message AuthenticationDouble Ratchetinj-event(encrypt(m)) ⇒ inj-event(decrypt(m))security.pvsecurity.pv:78Proved

Property 1: Key Secrecy​

What It Means​

Definition: The attacker can never learn any secret key used in the protocol.

ProVerif Query​

attacker(sk)\text{attacker}(sk)

Mathematical Meaning​

∀ secret s:sk,not reachable by attacker\forall \text{ secret } s: \text{sk}, \quad \text{not reachable by attacker}

What This Proves​

Private keys of Alice and Bob are never exposed
Shared secret from X3DH never reaches attacker
Ephemeral keys are never compromised
All message keys remain confidential

Models That Prove It​

ModelLinesQueryResult
x3dh_complete.pv36query attacker(sk)RESULT not true
x3dh_security.pv40query attacker(skey)RESULT not true
double_ratchet_key_derivation.pv50query attacker(sk)RESULT not true

Real-World Implication​

Eve can:

  • Capture all network traffic
  • Observe all public keys
  • See all encrypted messages

Eve cannot:

  • Derive any private key
  • Compute the shared secret
  • Decrypt any message

Counterexample​

If this property were FALSE:

ProVerif would report: RESULT: false (attacker can learn sk)
Then ProVerif would show exactly how the attacker reaches the secret

This never happens! The model proves it's impossible.


Property 2: Authentication (Handshake Correspondence)​

What It Means​

Definition: If Alice initiates the X3DH handshake, Bob must successfully respond.

ProVerif Query​

\text{inj-event(alice_initiates)} \implies \text{inj-event(bob_responds)}

Mathematical Meaning​

∀ execution, if event(a) fires then event(b) must fire\forall \text{ execution, } \text{if } \text{event(a) fires then } \text{event(b) must fire}

What This Proves​

Alice's initiation always leads to Bob's response
No partial executions (aborting halfway)
Events happen in correct order
Handshake completes successfully

Models That Prove It​

ModelLinesQueryResult
x3dh_complete.pv37query x: bitstring; inj-event(alice_initiates)RESULT: true

Real-World Implication​

When Alice downloads Bob's keys and initiates X3DH:

  • Bob receives the request
  • Bob computes his 4 DH operations
  • Bob derives the same shared secret
  • Bob can decrypt Alice's message

No "hanging" or "partial" state is possible in the protocol model.


Property 3: MITM Resistance (Signature Verification)​

What It Means​

Definition: An attacker cannot replace Bob's keys with their own without detection.

ProVerif Query​

\text{inj-event(bobs_keys_upload)} \implies \text{inj-event(signature_verified(x))}

Without Signature Verification​

Result: MITM attack succeeds!

With Signature Verification​

Result: MITM attack prevented!

Models That Prove It​

ModelLinesQueryResult
x3dh_security.pv35query x: bitstring; inj-event(bobs_keys_upload) ⇒ inj-event(signature_verified(x))RESULT: true

Real-World Implication​

  • Eve cannot replace Bob's keys with her own
  • Alice always detects fake keys
  • No impersonation possible
  • Authentication holds

Property 4: Four DH Operations Ordering​

What It Means​

Definition: The 4 Diffie-Hellman operations execute in the correct temporal order.

ProVerif Queries​

query x,y:bitstring;inj-event(dh1computed(x))  ⟹  inj-event(dh2computed(y))query x,y:bitstring;inj-event(dh2computed(x))  ⟹  inj-event(dh3computed(y))query x,y:bitstring;inj-event(dh3computed(x))  ⟹  inj-event(dh4computed(y))\begin{aligned} \text{query } x, y: \text{bitstring}; &\quad \text{inj-event}(dh1_computed(x)) \implies \text{inj-event}(dh2_computed(y)) \\ \text{query } x, y: \text{bitstring}; &\quad \text{inj-event}(dh2_computed(x)) \implies \text{inj-event}(dh3_computed(y)) \\ \text{query } x, y: \text{bitstring}; &\quad \text{inj-event}(dh3_computed(x)) \implies \text{inj-event}(dh4_computed(y)) \end{aligned}

Mathematical Meaning​

Event ordering: dh1<dh2<dh3<dh4\text{Event ordering: } dh1 < dh2 < dh3 < dh4

What This Proves​

DH operations execute in sequence
No out-of-order execution
Protocol steps complete before next step

Models That Prove It​

ModelLinesQueriesResult
x3dh_4dh.pv34, 37, 403 temporal ordering queriesAll RESULT: true

Real-World Implication​

Alice's X3DH handshake:

1. Download Bob's keys
2. Generate ephemeral key
3. Compute DH1 = DH(IK_A, SPK_B) ← First
4. Compute DH2 = DH(EK_A, IK_B) ← Second
5. Compute DH3 = DH(EK_A, SPK_B) ← Third
6. Compute DH4 = DH(EK_A, OPK_B) ← Fourth
7. Derive shared secret

Model proves this order is enforced.


Property 5: Forward Secrecy​

What It Means​

Definition: Compromise of the current key does not compromise any previous messages.

ProVerif Query​

\text{inj-event(encrypt(m_n))} \implies \forall i < n: \text{not attacker}(key_i)

Mathematical Meaning​

If we encrypt message mn, then for all i<n, attacker cannot learn keyi\text{If we encrypt message } m_n, \text{ then for all } i < n, \text{ attacker cannot learn } key_i

What This Proves​

Past keys become unavailable after use
Deleting old keys maintains security
Compromise of key KnK_n only affects message mnm_n

Models That Prove It​

ModelLinesQueryResult
double_ratchet_security.pv67query inj-event(encrypt(m_n)) ⇒ ∀i<n: ¬attacker(key_i)RESULT: true

Real-World Scenarios​

Scenario: Eve compromises the current message key K5K_5 at time t=5t=5

What Eve can do:

  • Decrypt message 5 (current message)

What Eve cannot do:

  • Decrypt message 0 (past message)
  • Decrypt message 1 (past message)
  • Decrypt message 4 (past message)
  • Decrypt message 6 (future message)

Why? Each message uses a unique key derived from advancing chain key. Old keys are deleted.


Property 6: Post-Compromise Security​

What It Means​

Definition: After compromising the current state, the system recovers securely with new keys.

ProVerif Query​

\text{inj-event(new_dh_ratchet)} \implies \text{inj-event(secure_recovery)}

Mathematical Meaning​

If a new DH ratchet occurs, then the system securely recovers\text{If a new DH ratchet occurs, then the system securely recovers}

What This Proves​

New DH pair creates new secrecy
Old keys don't help compute new keys
System automatically recovers after compromise
Attack window is limited

Models That Prove It​

ModelLinesQueryResult
double_ratchet_security.pv72query inj-event(new_dh_ratchet) ⇒ inj-event(secure_recovery)RESULT: true

Real-World Scenarios​

Scenario: Eve compromises Bob's device at time t=5t=5

At t=5t=5:

  • Eve learns root key R5R_5
  • Eve learns chain key CK5CK_5
  • Eve learns message key K5K_5

Eve can:

  • Decrypt message 5 (has K5K_5)

Then Bob sends message 6, 7, 8...

At t=6t=6 (after DH ratchet):

  • New DH pair created (Bob)
  • Compute new DH1, DH2
  • Derive new root key R6R_6 from DH outputs
  • Derive new chain key CK6CK_6 from R6R_6
  • Derive new message key K6K_6 from CK6CK_6

Eve's old knowledge:

  • R5R_5 (old root key)
  • CK5CK_5 (old chain key)
  • K5K_5 (old message key)

Can Eve compute K6K_6?

  • NO! Eve needs:
    • New DH outputs (DH1, DH2)
    • Bob's new DH private keys
    • Alice's new DH private keys

Eve doesn't have these! New DH ratchet creates new randomness.

Result: Eve can only read message 5. Messages 6+ stay secure!


Property 7: Message Authentication​

What It Means​

Definition: If Alice encrypts a message, Bob can decrypt it (and no one else can).

ProVerif Query​

inj-event(encrypt(m))  ⟹  inj-event(decrypt(m))\text{inj-event(encrypt(m))} \implies \text{inj-event(decrypt(m))}

Mathematical Meaning​

If message m is encrypted, then it is decrypted\text{If message } m \text{ is encrypted, then it is decrypted}

What This Proves​

Encryption and decryption correspond
No decryption without encryption
Message authenticity
No tampering

Models That Prove It​

ModelLinesQueryResult
double_ratchet_security.pv78query inj-event(encrypt(m)) ⇒ inj-event(decrypt(m))RESULT: true
double_ratchet_key_derivation.pv64, 75query inj-event(message_encrypted(x))RESULT: true

Real-World Implication​

Alice sends:

  • Encrypt message "Hello" with K5K_5
  • Send ciphertext + MAC

Bob receives:

  • Verify MAC (prove Alice encrypted)
  • Decrypt with K5K_5
  • Recover "Hello"

Eve intercepts:

  • Sees ciphertext + MAC
  • Without K5K_5 Cannot decrypt
  • Cannot forge new MAC (authenticated encryption)

Result: Only Bob can read "Hello", and only Alice could have encrypted it!


Quick Check​

Which property proves Eve can't read past messages after compromise?

Property 5: Forward Secrecy

Compromise of key KnK_n at time nn:

  • Encrypts: Message nn (current)
  • Cannot encrypt: Messages 00 to n−1n-1 (past)

Proved in model: double_ratchet_security.pv:67

Which property proves Eve can't forge messages?

Property 7: Message Authentication

Eve can:

  • Capture ciphertext
  • Cannot decrypt (missing key)
  • Cannot forge MAC (AEAD protects)

Proved in model: double_ratchet_security.pv:78

Which property proves no MITM attack?

Property 3: MITM Resistance (Signature Verification)

Eve tries to:

  • Replace Bob's keys with Eve's keys
  • Alice signature verification rejects fake keys
  • Handshake aborted

Proved in model: x3dh_security.pv:35


Properties vs. Models​

Which models prove which properties:


Key Takeaways​

7 Security Properties Proved: Key secrecy, authentication, MITM resistance, ordering, forward secrecy, post-compromise security, message authentication

All Models Verify Properties: 7 ProVerif models prove all properties

Mathematical Proofs: Each property has precise ProVerif query

Real-World Scenarios: Models handle actual attacker capabilities

No Counterexamples: ProVerif confirms no vulnerability found


Next Steps​

Ready to see ProVerif models match the Rust implementation?

Continue: 06 Implementation Alignment


Further Reading​

Related Documentation:


Document Version: 1.0
Document Date: February 2026
ProVerif Version: 2.03+
Rust Version: 1.70+